<?php

namespace common\services\official;

use common\services\BaseService;
use common\repositories\official\SubscribeRepository;

class SubscribeService extends BaseService {
    
    public function saveBepeak ($data) {
        SubscribeRepository::saveBepeak($data);
    }
    
    /**
     * 获取文章列表
     * @param type $offset
     * @param type $limit
     * @return type
     */
    public function getArticleList ($offset, $limit, $dir) {
        return SubscribeRepository::getArticleList($offset, $limit, $dir);
    }

    /**
     * 获取目录列表
     */
    public function getDirList () {
        return SubscribeRepository::getDirList();
    }
    
    /**
     * 获取文章详细信息
     * @param type $id
     */
    public function getArticle ($id, $status=0, $type=null,$dir=0) {
        return SubscribeRepository::getArticle($id, $status, $type,$dir);
    }
    
    /**
     * 获取文章总数
     * @param type $dir
     * @return type
     */
    public function getArticleCount ($dir) {
        return SubscribeRepository::getArticleCount($dir);
    }
    
    /**
     * 获取预约用户列表
     */
    public function getBespeakList ($offset, $limit, $search) {
        return SubscribeRepository::getBespeakList($offset, $limit, $search);
    }
    /**
     * 根据id查询预约列表
     */
    public function getBespeakListByIds ($id) {
        return SubscribeRepository::getBespeakListByIds($id);
    }
}